export const getSumm = (quantity, pricePerOne) => {

    let numberQuantity = Number(quantity);
    let numberPricePerOne = Number(pricePerOne);

    return numberQuantity * numberPricePerOne
}

export const getRisk = (coeff) => {
    let coeffAbs = Math.abs(coeff)
    if (coeffAbs > 0.5) {
        return "Высокий"
    } else if (coeffAbs < 0.5 && coeffAbs !== 0) {
        return "Умеренный"
    } else {
        return "Низкий"
    }
}


export const checkPaperPosition = (data) => {

    let maxx = 0;
    let maxxPaper = "";
    for (let elem in data ) {
        if (data[elem].value > maxx) {
            maxxPaper = data[elem].name
        }
    }

    return maxxPaper
}